.class Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;
.super Ljava/lang/Object;
.source "ImageSwitcherActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/netease/newsreader/activity/ImageSwitcherActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/ImageSwitcherActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    .line 1688
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static synthetic access$0(Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;)Lcom/netease/newsreader/activity/ImageSwitcherActivity;
    .locals 1
    .parameter

    .prologue
    .line 1688
    iget-object v0, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    return-object v0
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 6
    .parameter "v"

    .prologue
    const/4 v4, 0x0

    .line 1693
    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    invoke-static {v1}, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->access$21(Lcom/netease/newsreader/activity/ImageSwitcherActivity;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 1694
    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    const-string v2, "\u5df2\u7ecf\u8bbe\u7f6e\u4e0d\u4e0b\u8f7d\u56fe\u7247"

    invoke-static {v1, v2, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    .line 1733
    :goto_0
    return-void

    .line 1698
    :cond_0
    new-instance v2, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    iget-object v1, v1, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->photolist:Ljava/util/List;

    iget-object v3, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    iget v3, v3, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->g_position:I

    invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/netease/newsreader/bean/PhotoInfo;

    invoke-virtual {v1}, Lcom/netease/newsreader/bean/PhotoInfo;->getPhotoid()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, ".jpg"

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/netease/newsreader/util/PicUtil;->isLocalPicExit(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 1699
    new-instance v0, Ljava/lang/ref/WeakReference;

    new-instance v2, Ljava/lang/StringBuilder;

    sget-object v1, Lcom/netease/newsreader/util/PicUtil;->phototempDir:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    iget-object v1, v1, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->photolist:Ljava/util/List;

    iget-object v3, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    iget v3, v3, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->g_position:I

    invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/netease/newsreader/bean/PhotoInfo;

    invoke-virtual {v1}, Lcom/netease/newsreader/bean/PhotoInfo;->getPhotoid()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ".jpg"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/netease/newsreader/util/PicUtil;->fitSizeImg(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    .line 1700
    .local v0, bitmapReference:Ljava/lang/ref/WeakReference;,"Ljava/lang/ref/WeakReference<Landroid/graphics/Bitmap;>;"
    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    iget-object v1, v1, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->photolist:Ljava/util/List;

    iget-object v2, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    iget v2, v2, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->g_position:I

    invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/netease/newsreader/bean/PhotoInfo;

    invoke-virtual {v1}, Lcom/netease/newsreader/bean/PhotoInfo;->getPhotoid()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/graphics/Bitmap;

    invoke-static {v2, v1}, Lcom/netease/newsreader/util/PicUtil;->downloadBitmap(Ljava/lang/String;Landroid/graphics/Bitmap;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 1701
    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    const-string v2, "\u6210\u529f\u4e0b\u8f7d\u5230\u76f8\u518c"

    invoke-static {v1, v2, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    .line 1702
    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    new-instance v2, Landroid/content/Intent;

    const-string v3, "android.intent.action.MEDIA_MOUNTED"

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "file://"

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 1703
    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 1702
    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v4

    invoke-direct {v2, v3, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    invoke-virtual {v1, v2}, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->sendBroadcast(Landroid/content/Intent;)V

    goto/16 :goto_0

    .line 1704
    :cond_1
    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    const-string v2, "\u4fdd\u5b58\u56fe\u7247\u5931\u8d25"

    invoke-static {v1, v2, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    goto/16 :goto_0

    .line 1707
    .end local v0           #bitmapReference:Ljava/lang/ref/WeakReference;,"Ljava/lang/ref/WeakReference<Landroid/graphics/Bitmap;>;"
    :cond_2
    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    invoke-static {v1}, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->access$22(Lcom/netease/newsreader/activity/ImageSwitcherActivity;)Landroid/app/ProgressDialog;

    move-result-object v1

    const-string v2, "\u6b63\u5728\u4e0b\u8f7d\u56fe\u7247..."

    invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setMessage(Ljava/lang/CharSequence;)V

    .line 1708
    iget-object v1, p0, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;->this$0:Lcom/netease/newsreader/activity/ImageSwitcherActivity;

    invoke-static {v1}, Lcom/netease/newsreader/activity/ImageSwitcherActivity;->access$22(Lcom/netease/newsreader/activity/ImageSwitcherActivity;)Landroid/app/ProgressDialog;

    move-result-object v1

    invoke-virtual {v1}, Landroid/app/ProgressDialog;->show()V

    .line 1710
    new-instance v1, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4$1;

    invoke-direct {v1, p0}, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4$1;-><init>(Lcom/netease/newsreader/activity/ImageSwitcherActivity$4;)V

    .line 1730
    invoke-virtual {v1}, Lcom/netease/newsreader/activity/ImageSwitcherActivity$4$1;->start()V

    goto/16 :goto_0
.end method
